home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1390.dms / var1390.adf / bs.AMOS / bs.amosSourceCode < prev    next >
AMOS Source Code  |  1994-01-24  |  12KB  |  613 lines

  1. Reserve As Work 8,1024
  2. Dim SH(40)
  3. Dim SQ(40)
  4. Global MZ,MK,RZ,ISTR,PTCH,SH(),SQ(),SHIFTY,OFFS,LOD,T,B,ANS$,MX,SWINE,RD,TMP,SAVVY
  5. SKANK
  6. Procedure FUNKY
  7.    Show On 
  8.    Volume 63
  9.    Screen Open 0,320,250,16,Lowres
  10.    Curs Off : Flash Off : Cls 0
  11.    Get Icon Palette 
  12.    For N=31 To 39 : Make Icon Mask N : Next N
  13.    Pen 4 : Paper 3
  14.    Ink 6,3
  15.    Colour 17,$333 : Colour 18,$666 : Colour 19,$0
  16.    SAVVY=True : SHIFT=False : LOD=False : B=12 : T=19 : OFFS=0 : SWINE=11 : MX=0
  17.    Set Dir 10,"*.sqz"
  18. End Proc
  19. Procedure SOFA
  20.    Reserve Zone 60
  21.    DRBUT
  22.    Z=21
  23.    For M=70 To 196 Step 32
  24.       For N=1 To 10
  25.          Paste Icon((N*32)-31),M,40
  26.          Set Zone Z,((N*32)-31),M To N*32,M+32
  27.          Inc Z
  28.       Next N
  29.    Next M
  30.    Paste Icon 1,198,42
  31.    Paste Icon 288,198,43
  32.    WRITE
  33. End Proc
  34. Procedure MOUSEY
  35.    MZ=0 : MK=0
  36.    Repeat 
  37.       MZ=Mouse Zone
  38.       MK=Mouse Key
  39.    Until Mouse Click and MK>0 and MZ>0
  40. End Proc
  41. Procedure SKANK
  42.    FUNKY
  43.    SOFA
  44.    JUMP
  45.    Do 
  46.       Limit Mouse 135,56 To 441,104
  47.       MOUSEY
  48.       RZ=MZ
  49.       SWITCH
  50.       On MZ Proc QUIT,HEAR,DUMB,GRAB,CRANK,CRUNCH,DUMP,SWIPE,PLST,JUMP,SHIFT,PLINK,PLINK,PLINK,PLINK,PLINK,PLINK,PLINK,PLINK,JUMP
  51.    Loop 
  52. End Proc
  53. Procedure QUIT
  54.    If SAVVY=False
  55.       CONF["    Quit! Without Saving it!"]
  56.    Else 
  57.       If ANS$="y" or SAVVY=True
  58.          CONF["    Quit Beat Sheets! "]
  59.       End If 
  60.    End If 
  61.    If ANS$="y"
  62.       Volume 10
  63.       Cls 0 : Run "ram:over_to"
  64.    End If 
  65. End Proc
  66. Procedure DUMB
  67.    SWITCH
  68. End Proc
  69. Procedure GRAB
  70.    Wind Save 
  71.    Wind Open 1,16,16,38,8
  72.    Curs Off 
  73.    Border 4,2,0
  74.    Pen 14 : Paper 2
  75.    Clw 
  76.    Print : Print "    M I D I...."
  77.    Print : Print 
  78.    Print "  M"; : Pen 0
  79.    Print "oney "; : Pen 14
  80.    Print "I"; : Pen 0
  81.    Print "s "; : Pen 14
  82.    Print "D"; : Pen 0
  83.    Print "efinitely "; : Pen 14
  84.    Print "I"; : Pen 0
  85.    Print "nspirational!"
  86.    Print : Print "  Click if a cheque is in the post"; : Pen 14
  87.    Print "! "
  88.    Repeat 
  89.    Until Mouse Click
  90.    Wind Close 
  91. End Proc
  92. Procedure CRANK
  93.    Dir$="DF0:Sheets/"
  94.    F$=Fsel$("",F$,"LOAD A SONG","Double Click on Title")
  95.    If F$=""
  96.       Bell 10
  97.       Pop Proc
  98.    End If 
  99.    Load F$,8
  100.    MX=Peek(Start(8))
  101.    F$=F$+".sqz"
  102.    Open In 1,F$
  103.    For N=0 To 40
  104.       Input #1,SQ(N)
  105.    Next N
  106.    Close 1
  107.    OFFS=0
  108.    LOOKING
  109.    PRETTY
  110.    Dir$="df0:"
  111.    SAVVY=True
  112. End Proc
  113. Procedure CRUNCH
  114.    Dir$="df0:sheets/"
  115.    F$=Fsel$("",F$,"SAVE A SONG","Type Title - Press RETURN")
  116.    If F$=""
  117.       Bell 10
  118.       Pop Proc
  119.    End If 
  120.    Poke Start(8),MX
  121.    SQ(0)=TMP
  122.    Change Mouse 3
  123.    Save F$,8
  124.    F$=F$+".sqz"
  125.    Open Out 1,F$
  126.    For N=0 To 40
  127.       Print #1,SQ(N)
  128.    Next N
  129.    Close 1
  130.    Dir$="df0:"
  131.    SAVVY=True
  132.    Change Mouse 1
  133. End Proc
  134. Procedure DUMP
  135.    If MK=2
  136.       If OFFS>0
  137.          Dec OFFS
  138.          LOOKING
  139.          PRETTY
  140.       Else 
  141.          Bell 10
  142.       End If 
  143.    Else 
  144.       BUMP
  145.       If OFFS<21
  146.          Inc OFFS
  147.          If OFFS>MX
  148.             Inc MX
  149.          Else 
  150.             LOOKING
  151.             PRETTY
  152.          End If 
  153.       End If 
  154.    End If 
  155.    WRITE
  156. End Proc
  157. Procedure SWIPE
  158.    Limit Mouse 
  159.    RZ=MZ
  160.    If MK=2
  161.       CANF
  162.       If ANS$="0"
  163.          WIPE
  164.          BLANK
  165.       End If 
  166.       If ANS$="1"
  167.          If SAVVY=False
  168.             CONF[" Wipe!  Without Saving it!"]
  169.             If ANS$="y"
  170.                SAVVY=True
  171.             End If 
  172.          End If 
  173.          If SAVVY=True
  174.             For N=1 To 1000
  175.                Poke Start(8)+N,0
  176.             Next N
  177.             OFFS=0 : MX=1
  178.             For N=0 To 40 : SQ(N)=0 : Next N
  179.             WIPE
  180.             BLANK
  181.             WRITE
  182.          End If 
  183.       End If 
  184.    Else 
  185.       BLINK
  186.       MZ=RZ
  187.       SWITCH
  188.       SAVVY=False
  189.    End If 
  190. End Proc
  191. Procedure BUMP
  192.    ST=Start(8)+(OFFS*40)
  193.    For N=1 To 40
  194.       Poke ST+N,SH(N)
  195.    Next N
  196. End Proc
  197. Procedure PLINK
  198.    SAVVY=False
  199.    ISTR=MZ-11
  200.    If SHIFTY
  201.       ISTR=ISTR+8
  202.    End If 
  203.    If ISTR=16 Then ISTR=ISTR+KOS
  204.    Sam Play %1000,ISTR,10000
  205.    CULERIT
  206.    PLONK
  207. End Proc
  208. Procedure SWITCH
  209.    R=1 : SWP=(RZ*32)-31
  210.    If RZ>10
  211.       R=32 : SWP=((RZ-10)*32)-31
  212.    End If 
  213.    Paste Icon SWP,R,39
  214.    Wait 5
  215.    If SHIFTY and MZ>11 and MZ<20 Then RZ=RZ+10
  216.    Paste Icon SWP,R,RZ
  217.    If MZ<12 or MZ>19
  218.       Sam Play 1,17,9000
  219.    End If 
  220. End Proc
  221. Procedure SHIFT
  222.    If SWINE=11 Then SWINE=41 Else SWINE=11
  223.    Paste Icon 1,32,SWINE
  224.    M=32
  225.    If SHIFTY
  226.       B=12 : T=19
  227.       SHIFTY=False
  228.    Else 
  229.       B=22 : T=29
  230.       SHIFTY=True
  231.    End If 
  232.    For N=B To T
  233.       Paste Icon M,32,N
  234.       Add M,32
  235.    Next N
  236. End Proc
  237. Procedure CULERIT
  238.    M=32
  239.    For N=31 To 38
  240.       Paste Icon M,32,30
  241.       Paste Icon M,32,N
  242.       Add M,32
  243.    Next N
  244.    Limit Mouse 167,95 To 410,100
  245.    MOUSEY
  246.    PTCH=MZ-11
  247.    Sam Play %1000,ISTR,(PTCH+11)*800
  248.    M=32
  249.    For N=B To T
  250.       Paste Icon M,32,N
  251.       Add M,32
  252.    Next N
  253. End Proc
  254. Procedure PLONK
  255.    Limit Mouse 133,124 To 442,240
  256.    Repeat 
  257.       MOUSEY
  258.    Until MZ>20
  259.    RZ=MZ : RST=ISTR
  260.    ISH=11
  261.    If SHIFTY Then ISH=ISH+2
  262.    X=MZ/10 : X=MZ-(X*10) : If X=0 Then X=10
  263.    Y=MZ-X
  264.    X=(X*32)-31
  265.    Y=Y/10-1
  266.    Y=70+((Y*32)-32)
  267.    Paste Icon X,Y,ISTR+ISH
  268.    Paste Icon X,Y,PTCH+30
  269.    If SHIFTY Then ISTR=ISTR-8
  270.    ISTR=ISTR*10
  271.    If SHIFTY Then ISTR=ISTR+100
  272.    SH(RZ-20)=ISTR+PTCH
  273.    If RZ<41 Then TK=%1000 Else TK=%100
  274.    Sam Play TK,RST,(PTCH+11)*800
  275.    Wait 15
  276. End Proc
  277. Procedure HEAR
  278.    Paste Icon 32,1,39
  279.    Limit Mouse 
  280.    Wait 10
  281.    Y Mouse=77 : X Mouse=215
  282.    TMP=SQ(0)
  283.    If TMP=0 Then TMP=13
  284.    If MK=2
  285.       PUNKY
  286.    Else 
  287.       Do 
  288.          BX=10 : BY=68
  289.          MZ=Mouse Zone
  290.          MK=Mouse Key
  291.          If MZ=3 and MK>0
  292.             Exit 
  293.          End If 
  294.          BO=1 : TP=31
  295.          For N=1 To 10
  296.             Bob 1,BX,BY,1
  297.             Add BX,32
  298.             Restore 
  299.             For M=BO To TP Step 10
  300.                If X Mouse<140
  301.                   TMP=Y Mouse-30 : TMP=TMP/10
  302.                End If 
  303.                SS=0
  304.                ZZ=SH(M)
  305.                Read TK
  306.                If ZZ>0
  307.                   If ZZ>90
  308.                      SS=8 : ZZ=ZZ-100
  309.                   End If 
  310.                   II=(ZZ/10) : PP=ZZ-(II*10)
  311.                   Sam Play TK,II+SS,((PP+11)*800)
  312.                End If 
  313.             Next M
  314.             Inc BO : Inc TP
  315.             Wait TMP
  316.          Next N
  317.       Loop 
  318.    End If 
  319.    Bob Off 
  320.    Paste Icon 32,1,2
  321.    RZ=MZ : SWITCH
  322.    Data %1000,%1,%10,%100
  323. End Proc
  324. Procedure WIPE
  325.    For M=70 To 196 Step 32
  326.       For N=1 To 10
  327.          Paste Icon((N*32)-31),M,40
  328.       Next N
  329.    Next M
  330.    For N=1 To 40 : SH(N)=0 : Next N
  331. End Proc
  332. Procedure BLINK
  333.    Paste Icon 225,1,39
  334.    Y Mouse=200
  335.    Do 
  336.       Repeat 
  337.          MZ=Mouse Zone
  338.          If Y Mouse<110 Then MZ=8
  339.       Until(Mouse Click and MZ>20) or MZ=8
  340.       Exit If MZ=8
  341.       X=MZ/10 : X=MZ-(X*10) : If X=0 Then X=10
  342.       Y=MZ-X
  343.       X=(X*32)-31
  344.       Y=Y/10-1
  345.       Y=70+((Y*32)-32)
  346.       Paste Icon X,Y,40
  347.       Sam Play 1,17,9000
  348.       SH(MZ-20)=0
  349.    Loop 
  350. End Proc
  351. Procedure CONF[TT$]
  352.    ANS$=""
  353.    Wind Save 
  354.    Wind Open 1,16,16,36,8
  355.    Curs Off 
  356.    Border 4,2,0
  357.    Pen 0 : Paper 2
  358.    Clw 
  359.    Title Top TT$
  360.    Print : Print 
  361.    Print "        Are you really sure?    "
  362.    Print 
  363.    Print "          Press "; : Pen 14
  364.    Print "Y "; : Pen 0
  365.    Print "if yes " : Print 
  366.    Print "      or any other key for no.";
  367.    Clear Key 
  368.    Repeat 
  369.       ANS$=Inkey$
  370.    Until ANS$<>""
  371.    ANS$=Lower$(ANS$)
  372.    Wind Close 
  373. End Proc
  374. Procedure BLANK
  375.    For N=0 To 40
  376.       SH(N)=0
  377.       SQ(N)=0
  378.    Next N
  379. End Proc
  380. Procedure WRITE
  381.    T$=Str$(OFFS+1)
  382.    If OFFS+1<10
  383.       T$=Right$(T$,1)
  384.       T$="00"+T$
  385.    Else 
  386.       T$=Right$(T$,2)
  387.       T$="0"+T$
  388.    End If 
  389.    Text 197,24,T$
  390. End Proc
  391. Procedure PUNKY
  392.    OFFS=0 : CSQ=1
  393.    If SQ(1)>0 Then OFFS=SQ(CSQ)-1
  394.    Do 
  395.       Timer=0
  396.       WRITE
  397.       LOOKING
  398.       PRETTY
  399.       MZ=Mouse Zone
  400.       MK=Mouse Key
  401.       If MZ=3 and MK>0
  402.          Exit 
  403.       End If 
  404.       BO=1 : TP=31
  405.       BX=10 : BY=68
  406.       Repeat : Until Timer=>TMP
  407.       For N=1 To 10
  408.          Bob 1,BX,BY,1
  409.          Restore 
  410.          For M=BO To TP Step 10
  411.             If X Mouse<140
  412.                TMP=Y Mouse-30 : TMP=TMP/10
  413.             End If 
  414.             SS=0
  415.             ZZ=SH(M)
  416.             Read TK
  417.             If ZZ>0
  418.                If ZZ>90
  419.                   SS=8 : ZZ=ZZ-100
  420.                End If 
  421.                II=(ZZ/10) : PP=ZZ-(II*10)
  422.                Sam Play TK,II+SS,((PP+11)*800)
  423.             End If 
  424.          Next M
  425.          If N<10
  426.             Wait TMP
  427.          End If 
  428.          Inc BO : Inc TP : Add BX,32
  429.       Next N
  430.       If SQ(1)>0
  431.          Inc CSQ
  432.          OFFS=SQ(CSQ)-1
  433.          If OFFS=-1
  434.             CSQ=1
  435.             OFFS=SQ(CSQ)-1
  436.          End If 
  437.       Else 
  438.          Add OFFS,1,0 To MX-1
  439.       End If 
  440.       Bob Off 
  441.    Loop 
  442.    Data %1000,%1,%10,%100
  443. End Proc
  444. Procedure PRETTY
  445.    CN=1
  446.    For M=70 To 196 Step 32
  447.       For N=1 To 10
  448.          ZZ=SH(CN)
  449.          SS=0
  450.          If ZZ>0
  451.             If ZZ>90
  452.                SS=10 : ZZ=ZZ-100
  453.             End If 
  454.             II=(ZZ/10) : PP=ZZ-(II*10)
  455.          Else 
  456.             II=29
  457.          End If 
  458.          Paste Icon((N*32)-31),M,II+11+SS
  459.          If ZZ>0
  460.             Paste Icon((N*32)-31),M,PP+30
  461.          End If 
  462.          Inc CN
  463.       Next N
  464.    Next M
  465. End Proc
  466. Procedure LOOKING
  467.    ST=Start(8)+(OFFS*40)
  468.    For N=1 To 40
  469.       SH(N)=Peek(ST+N)
  470.    Next N
  471. End Proc
  472. Procedure CANF
  473.    Wind Save 
  474.    Wind Open 1,16,16,36,8
  475.    Curs Off 
  476.    Border 4,2,0
  477.    Pen 0 : Paper 2
  478.    Clw 
  479.    Print 
  480.    Print "    Press "; : Pen 14
  481.    Print "0 "; : Pen 0
  482.    Print "to clear this sheet"
  483.    Print 
  484.    Print "   or "; : Pen 14
  485.    Print "1 "; : Pen 0
  486.    Print "to clear the whole song. " : Print 
  487.    Print "  Press "; : Pen 14
  488.    Print "N "; : Pen 0
  489.    Print "if it is all a mistake!"
  490.    Clear Key 
  491.    Repeat 
  492.       ANS$=Inkey$
  493.    Until(ANS$="1") or(ANS$="0") or(ANS$="n")
  494.    Wind Close 
  495. End Proc
  496. Procedure JUMP
  497.    Wind Save 
  498.    Wind Open 1,16,16,36,8
  499.    Curs Off 
  500.    Border 4,2,0
  501.    Pen 0 : Paper 2
  502.    Clw 
  503.    Print : Print 
  504.    Print "            BEAT SHEETS" : Print 
  505.    A$="  Copyright "
  506.    A$=A$+Chr$(169)
  507.    A$=A$+" 1993   Duncan Moran"
  508.    Print A$
  509.    Print : Print 
  510.    Print "         Click to continue"
  511.    Repeat 
  512.    Until Mouse Click
  513.    Wind Close 
  514. End Proc
  515. Procedure PLST
  516.    M=1
  517.    For N=1 To 10
  518.       Paste Icon M,1,21
  519.       N$=Str$(N)
  520.       If N<10 Then N$=" "+N$
  521.       If N<=MX
  522.          Text M+3,12,N$
  523.       End If 
  524.       Add M,32
  525.    Next N
  526.    M=1
  527.    For N=11 To 20
  528.       Paste Icon M,32,21
  529.       N$=Str$(N)
  530.       If N<=MX
  531.          Text M+3,43,N$
  532.       End If 
  533.       Add M,32
  534.    Next N
  535.    Get Block 1,1,1,319,64
  536.    If MX<2
  537.       CONF[" Make a list from just one sheet!"]
  538.       DRBUT
  539.       Pop Proc
  540.    End If 
  541.    If SQ(1)<>0
  542.       CONF["   Destroy existing sequence!"]
  543.       If ANS$<>"y"
  544.          DRBUT : Pop Proc
  545.       End If 
  546.    End If 
  547.    Limit Mouse 
  548.    For N=1 To 40 : SQ(N)=0 : Next N
  549.    Y Mouse=272
  550.    Wind Save 
  551.    Wind Open 1,16,76,36,12
  552.    Curs Off 
  553.    Border 4,2,0
  554.    Pen 0 : Paper 2
  555.    Clw 
  556.    Print : Print 
  557.    Print "         Sheet Sequencer   "
  558.    Print : Print 
  559.    Print "  Click on the sheet numbers above " : Print 
  560.    Print " in the order you want them played." : Print : Print 
  561.    Print "   Click DOWN HERE when finished "
  562.    Wait 25
  563.    Repeat : Until Y Mouse<110
  564.    Wind Close 
  565.    C=1
  566.    Limit Mouse 
  567.    ZM=0
  568.    Do 
  569.       Repeat 
  570.          MZ=Mouse Zone
  571.          If MZ<>ZM and MZ>0 and MZ<21
  572.             OFFS=MZ-1
  573.             LOOKING
  574.             PRETTY
  575.             ZM=MZ
  576.          End If 
  577.       Until Mouse Click and MZ>0
  578.       Exit If MZ>20 or C=40
  579.       If MZ<=MX
  580.          SQ(C)=MZ : RZ=MZ
  581.          Sam Play 15,17,9000
  582.          R=1 : SWP=(RZ*32)-31
  583.          If RZ>10
  584.             R=32 : SWP=((RZ-10)*32)-31
  585.          End If 
  586.          Paste Icon SWP,R,39
  587.          Wait 5
  588.          Put Block 1
  589.          Inc C
  590.       Else 
  591.          Bell 10
  592.       End If 
  593.    Loop 
  594.    Del Block 1
  595.    DRBUT
  596.    OFFS=0
  597.    WRITE
  598. End Proc
  599. Procedure DRBUT
  600.    M=1
  601.    For N=1 To 10
  602.       Paste Icon M,1,N
  603.       Set Zone N,M,1 To M+31,32
  604.       Add M,32
  605.    Next N
  606.    M=1
  607.    For N=11 To 20
  608.       Paste Icon M,32,N
  609.       Set Zone N,M,32 To M+31,64
  610.       Add M,32
  611.    Next N
  612.    SHIFTY=False : SWINE=11 : B=12 : T=19
  613. End Proc